

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>The postmethods module content &mdash; buzzRTShare v1.0.1 documentation</title>
    <link rel="stylesheet" href="_static/default.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '',
        VERSION:     '1.0.1',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <link rel="top" title="buzzRTShare v1.0.1 documentation" href="index.html" />
    <link rel="prev" title="The dbclasses module content" href="dbclasses.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="dbclasses.html" title="The dbclasses module content"
             accesskey="P">previous</a> |</li>
        <li><a href="index.html">buzzRTShare v1.0.1 documentation</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="module-postmethods">
<span id="the-postmethods-module-content"></span><h1>The <cite>postmethods</cite> module content<a class="headerlink" href="#module-postmethods" title="Permalink to this headline">¶</a></h1>
<div class="section" id="the-getstringattachs-function">
<h2>The <tt class="docutils literal"><span class="pre">getStringAttachs</span></tt> function<a class="headerlink" href="#the-getstringattachs-function" title="Permalink to this headline">¶</a></h2>
<dl class="function">
<dt id="postmethods.getStringAttachs">
<tt class="descclassname">postmethods.</tt><tt class="descname">getStringAttachs</tt><big>(</big><em>attachs</em><big>)</big><a class="headerlink" href="#postmethods.getStringAttachs" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the number the characters of the contents of dictionary passed in input, with a the content joined as:</p>
<p>key1: value1 key2: value2 .... keyN: valueN</p>
<p>The pairs keys and values are separated by spaces.</p>
</dd></dl>

</div>
<div class="section" id="the-removelastword-function">
<h2>The <tt class="docutils literal"><span class="pre">removeLastWord</span></tt> function<a class="headerlink" href="#the-removelastword-function" title="Permalink to this headline">¶</a></h2>
<dl class="function">
<dt id="postmethods.removeLastWord">
<tt class="descclassname">postmethods.</tt><tt class="descname">removeLastWord</tt><big>(</big><em>str</em><big>)</big><a class="headerlink" href="#postmethods.removeLastWord" title="Permalink to this definition">¶</a></dt>
<dd><p>Return str without the last word and adds three dot. If str contain only one word return None</p>
</dd></dl>

</div>
<div class="section" id="the-joinlistwithspace-function">
<h2>The <tt class="docutils literal"><span class="pre">joinListWithSpace</span></tt> function<a class="headerlink" href="#the-joinlistwithspace-function" title="Permalink to this headline">¶</a></h2>
<dl class="function">
<dt id="postmethods.joinListWithSpace">
<tt class="descclassname">postmethods.</tt><tt class="descname">joinListWithSpace</tt><big>(</big><em>*list</em><big>)</big><a class="headerlink" href="#postmethods.joinListWithSpace" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the list joined with a space, but values empty in list will be ignored and not added, so no double space will be added.</p>
<p>Return an empty string if list is empty or None.</p>
</dd></dl>

</div>
<div class="section" id="the-removeendspuctuation-function">
<h2>The <tt class="docutils literal"><span class="pre">removeEndsPuctuation</span></tt> function<a class="headerlink" href="#the-removeendspuctuation-function" title="Permalink to this headline">¶</a></h2>
<dl class="function">
<dt id="postmethods.removeEndsPuctuation">
<tt class="descclassname">postmethods.</tt><tt class="descname">removeEndsPuctuation</tt><big>(</big><em>str</em>, <em>punctuation</em><big>)</big><a class="headerlink" href="#postmethods.removeEndsPuctuation" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the str string without punctuation at the and and stripped.</p>
</dd></dl>

</div>
<div class="section" id="the-posttweet-function">
<h2>The <tt class="docutils literal"><span class="pre">postTweet</span></tt> function<a class="headerlink" href="#the-posttweet-function" title="Permalink to this headline">¶</a></h2>
<dl class="function">
<dt id="postmethods.postTweet">
<tt class="descclassname">postmethods.</tt><tt class="descname">postTweet</tt><big>(</big><em>act</em>, <em>u</em><big>)</big><a class="headerlink" href="#postmethods.postTweet" title="Permalink to this definition">¶</a></dt>
<dd><p>Makes a request to twitter for update the status.
Gets content from the Activity object passed in input.
If the content exceeds max characters allowed in twitter
the content is reduced, the logic has the following priorities:</p>
<ol class="arabic simple">
<li>while attachments are present remove the last word from the description (title or type) of the last attachment.
If description is empty entire attachment is removed.</li>
<li>If all the attachments are removed and the content remove the last word from the main content of the 
Activity object until the content not exceed the max characters allowed.</li>
</ol>
<p>If geotag points are present in Activity will be added to twitter update.</p>
</dd></dl>

</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h3><a href="index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">The <cite>postmethods</cite> module content</a><ul>
<li><a class="reference internal" href="#the-getstringattachs-function">The <tt class="docutils literal"><span class="pre">getStringAttachs</span></tt> function</a></li>
<li><a class="reference internal" href="#the-removelastword-function">The <tt class="docutils literal"><span class="pre">removeLastWord</span></tt> function</a></li>
<li><a class="reference internal" href="#the-joinlistwithspace-function">The <tt class="docutils literal"><span class="pre">joinListWithSpace</span></tt> function</a></li>
<li><a class="reference internal" href="#the-removeendspuctuation-function">The <tt class="docutils literal"><span class="pre">removeEndsPuctuation</span></tt> function</a></li>
<li><a class="reference internal" href="#the-posttweet-function">The <tt class="docutils literal"><span class="pre">postTweet</span></tt> function</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="dbclasses.html"
                        title="previous chapter">The <cite>dbclasses</cite> module content</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="_sources/postmethods.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" size="18" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="dbclasses.html" title="The dbclasses module content"
             >previous</a> |</li>
        <li><a href="index.html">buzzRTShare v1.0.1 documentation</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2010, Giuseppe Buzzanca (PiDy) &lt; giuseppebuzzanca@gmail.com &gt; .
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.4.
    </div>
  </body>
</html>